package com.solidtrust.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnore;

@Entity
@Table(name = "areas")
public class Area {

	@Id
	@Column(name = "area_id")
	private Integer id;
	
	@Column(name = "parent_id")
	private Integer parent;
	
	@Column(name = "area_name")
	private String name;
	
	@Column(name = "py_name")
	private String pinyin;
	
	//0 country, 1 province, 2 city, 3 district
	@Column(name = "area_type")
	private short type;
	
	//if special city
	@JsonIgnore
	private boolean special;
	
	
	@JsonIgnore
	private String nameOfGanji;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getParent() {
		return parent;
	}

	public void setParent(Integer parent) {
		this.parent = parent;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPinyin() {
		return pinyin;
	}

	public void setPinyin(String pinyin) {
		this.pinyin = pinyin;
	}

	public short getType() {
		return type;
	}

	public void setType(short type) {
		this.type = type;
	}

	public boolean isSpecial() {
		return special;
	}

	public void setSpecial(boolean special) {
		this.special = special;
	}

	public String getNameOfGanji() {
		return nameOfGanji;
	}

	public void setNameOfGanji(String nameOfGanji) {
		this.nameOfGanji = nameOfGanji;
	}
	
	
}
